﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using Bon_It.Model;

namespace Bon.It.Server.Interfaces
{
    [ServiceContract]
    public interface IArticle
    {
        /// <summary>
        /// Get all <see cref="Artikel"/> from the database.
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        Artikel[] GetAllArticles();


        /// <summary>
        /// Store the <see cref="Artikel"/>.
        /// </summary>
        /// <param name="item"></param>
        [OperationContract]
        void PersistArticle(Artikel item);

        /// <summary>
        /// Delete the <see cref="Artikel"/> from the database.
        /// </summary>
        /// <param name="item"></param>
        [OperationContract]
        void DeleteArticle(Artikel item);

        /// <summary>
        /// Get the <see cref="Artikel"/> by the given id.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        Artikel GetArticleById(long id);

        /// <summary>
        /// Get the article by the <see cref="Artikel.EANNummer"/>
        /// </summary>
        /// <param name="eanNumber"></param>
        /// <returns></returns>
        [OperationContract]
        Artikel GetArtikelByEan(long eanNumber);
    }
}
